﻿using System.Windows;
using System.Windows.Controls;

namespace Red.Toolkit.EngineLogsViewer.Data
{
    public class EngineLogEntryTemplateSelector : DataTemplateSelector
    {
        public DataTemplate SingleEntryTemplate { get; set; }
        public DataTemplate GroupEntryTemplate { get; set; }

        public override DataTemplate SelectTemplate( object item, DependencyObject container )
        {
            if ( item is EngineLogGroupEntry )
            {
                return GroupEntryTemplate;
            }

            return SingleEntryTemplate;
        }
    }
}
